<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/common.js"></script>
	</head>

	<body>
		<input id="employeeId" name="submit" type="image" value=" " style="position:absolute; left:255px; top:300px; " src="img/yg.png" /><br />
		<input name="submit" id="khid" type="image" value=" " style="position:absolute; left:555px; top:300px; " src="img/zd.png" /><br />
		<input id="ckglId" name="submit" type="image" value=" " style="position:absolute; left:855px; top:300px; " src="img/ck.png" /><br />
		<input name="submit" id="xsid" type="image" value=" " style="position:absolute; left:1155px; top:300px; " src="img/xs.png" /><br />
		<input name="submit" id="jinhuoId" type="image" value=" " style="position:absolute; left:1455px; top:300px; " src="img/kh.png" /><br />
		<h3 style="margin-top: 300px;margin-left: 255px;">员工管理</h3>
		<h3 style="margin-top: -43px;margin-left: 560px;">客户管理</h3>
		<h3 style="margin-top: -43px;margin-left: 858px;">仓库管理</h3>
		<h3 style="margin-top: -43px;margin-left: 1160px;">销售管理</h3>
		<h3 style="margin-top: -43px;margin-left: 1460px;">进货管理</h3>
	</body>
	<script type="application/javascript">
		$("#employeeId").click(
			function() {
				$.post(globalData.server + 'user/modulesList', {
						userName: globalData.getUserName(),
						token: globalData.getToken
					},
					function(res) {
						for(var i = 0; i < res.modulesList.length; i++) {
							var modulList = res.modulesList[i]
							if(modulList.mname == "员工管理") {
								window.location.href = "easyui demo/zhuye.html";
								return;
							}
						}
						$.messager.alert("提示", "权限不足")

					}, "json")

			}
		)

		$("#ckglId").click(
			function() {
				$.post(globalData.server + 'user/modulesList', {
						userName: globalData.getUserName(),
						token: globalData.getToken
					},
					function(res) {
						for(var i = 0; i < res.modulesList.length; i++) {
							var modulList = res.modulesList[i]
							if(modulList.mname == "仓库管理") {
								window.location.href = "easyui_ck/zhuye.html";
								return;
							}
						}
						$.messager.alert("提示", "权限不足")

					}, "json")

			}
		)

		$("#jinhuoId").click(
			function() {
				$.post(globalData.server + 'user/modulesList', {
						userName: globalData.getUserName(),
						token: globalData.getToken
					},
					function(res) {
						for(var i = 0; i < res.modulesList.length; i++) {
							var modulList = res.modulesList[i]
							if(modulList.mname == "进货管理") {
								window.location.href = "easyui_jh/zhuye.html";
								return;
							}
						}
						$.messager.alert("提示", "权限不足")

					}, "json")

			}
		)
		$("#khid").click(
			function() {
				$.post(globalData.server + 'user/modulesList', {
						userName: globalData.getUserName(),
						token: globalData.getToken
					},
					function(res) {
						for(var i = 0; i < res.modulesList.length; i++) {
							var modulList = res.modulesList[i]
							if(modulList.mname == "客户管理") {
								window.location.href = "easyui_kh/zhuye.html";
								return;
							}
						}
						$.messager.alert("提示", "权限不足")

					}, "json")

			}
		)
		$("#xsid").click(
			function() {
				$.post(globalData.server + 'user/modulesList', {
						userName: globalData.getUserName(),
						token: globalData.getToken
					},
					function(res) {
						for(var i = 0; i < res.modulesList.length; i++) {
							var modulList = res.modulesList[i]
							if(modulList.mname == "销售管理") {
								window.location.href = "easyui_xs/zhuye.html";
								return;
							}
						}
						$.messager.alert("提示", "权限不足")

					}, "json")

			}
		)
	</script>

</html>